Integrand size = 32, antiderivative size = 55 \[ \int \frac {a+b x+c x^2}{x^2 \sqrt {-1+d x} \sqrt {1+d x}} \, dx=\frac {a \sqrt {-1+d x} \sqrt {1+d x}}{x}+\frac {c \text {arccosh}(d x)}{d}+b \arctan \left (\sqrt {-1+d x} \sqrt {1+d x}\right ) \]
[Out]
Leaf count is larger than twice the leaf count of optimal. \(135\) vs. \(2(55)=110\).
Time = 0.12 (sec) , antiderivative size = 135, normalized size of antiderivative = 2.45, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {1624, 1821, 858, 223, 212, 272, 65, 211} \[ \int \frac {a+b x+c x^2}{x^2 \sqrt {-1+d x} \sqrt {1+d x}} \, dx=-\frac {a \left (1-d^2 x^2\right )}{x \sqrt {d x-1} \sqrt {d x+1}}+\frac {b \sqrt {d^2 x^2-1} \arctan \left (\sqrt {d^2 x^2-1}\right )}{\sqrt {d x-1} \sqrt {d x+1}}+\frac {c \sqrt {d^2 x^2-1} \text {arctanh}\left (\frac {d x}{\sqrt {d^2 x^2-1}}\right )}{d \sqrt {d x-1} \sqrt {d x+1}} \]
[In]
[Out]
Rule 65
Rule 211
Rule 212
Rule 223
Rule 272
Rule 858
Rule 1624
Rule 1821
Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {-1+d^2 x^2} \int \frac {a+b x+c x^2}{x^2 \sqrt {-1+d^2 x^2}} \, dx}{\sqrt {-1+d x} \sqrt {1+d x}} \\ & = -\frac {a \left (1-d^2 x^2\right )}{x \sqrt {-1+d x} \sqrt {1+d x}}+\frac {\sqrt {-1+d^2 x^2} \int \frac {b+c x}{x \sqrt {-1+d^2 x^2}} \, dx}{\sqrt {-1+d x} \sqrt {1+d x}} \\ & = -\frac {a \left (1-d^2 x^2\right )}{x \sqrt {-1+d x} \sqrt {1+d x}}+\frac {\left (b \sqrt {-1+d^2 x^2}\right ) \int \frac {1}{x \sqrt {-1+d^2 x^2}} \, dx}{\sqrt {-1+d x} \sqrt {1+d x}}+\frac {\left (c \sqrt {-1+d^2 x^2}\right ) \int \frac {1}{\sqrt {-1+d^2 x^2}} \, dx}{\sqrt {-1+d x} \sqrt {1+d x}} \\ & = -\frac {a \left (1-d^2 x^2\right )}{x \sqrt {-1+d x} \sqrt {1+d x}}+\frac {\left (b \sqrt {-1+d^2 x^2}\right ) \text {Subst}\left (\int \frac {1}{x \sqrt {-1+d^2 x}} \, dx,x,x^2\right )}{2 \sqrt {-1+d x} \sqrt {1+d x}}+\frac {\left (c \sqrt {-1+d^2 x^2}\right ) \text {Subst}\left (\int \frac {1}{1-d^2 x^2} \, dx,x,\frac {x}{\sqrt {-1+d^2 x^2}}\right )}{\sqrt {-1+d x} \sqrt {1+d x}} \\ & = -\frac {a \left (1-d^2 x^2\right )}{x \sqrt {-1+d x} \sqrt {1+d x}}+\frac {c \sqrt {-1+d^2 x^2} \tanh ^{-1}\left (\frac {d x}{\sqrt {-1+d^2 x^2}}\right )}{d \sqrt {-1+d x} \sqrt {1+d x}}+\frac {\left (b \sqrt {-1+d^2 x^2}\right ) \text {Subst}\left (\int \frac {1}{\frac {1}{d^2}+\frac {x^2}{d^2}} \, dx,x,\sqrt {-1+d^2 x^2}\right )}{d^2 \sqrt {-1+d x} \sqrt {1+d x}} \\ & = -\frac {a \left (1-d^2 x^2\right )}{x \sqrt {-1+d x} \sqrt {1+d x}}+\frac {b \sqrt {-1+d^2 x^2} \tan ^{-1}\left (\sqrt {-1+d^2 x^2}\right )}{\sqrt {-1+d x} \sqrt {1+d x}}+\frac {c \sqrt {-1+d^2 x^2} \tanh ^{-1}\left (\frac {d x}{\sqrt {-1+d^2 x^2}}\right )}{d \sqrt {-1+d x} \sqrt {1+d x}} \\ \end{align*}
Time = 0.14 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.25 \[ \int \frac {a+b x+c x^2}{x^2 \sqrt {-1+d x} \sqrt {1+d x}} \, dx=\frac {a \sqrt {-1+d x} \sqrt {1+d x}}{x}+2 b \arctan \left (\sqrt {\frac {-1+d x}{1+d x}}\right )+\frac {2 c \text {arctanh}\left (\sqrt {\frac {-1+d x}{1+d x}}\right )}{d} \]
[In]
[Out]
Time = 1.62 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.73
method | result | size |
risch | \(\frac {a \sqrt {d x -1}\, \sqrt {d x +1}}{x}+\frac {\left (\frac {c \ln \left (\frac {x \,d^{2}}{\sqrt {d^{2}}}+\sqrt {d^{2} x^{2}-1}\right )}{\sqrt {d^{2}}}-b \arctan \left (\frac {1}{\sqrt {d^{2} x^{2}-1}}\right )\right ) \sqrt {\left (d x +1\right ) \left (d x -1\right )}}{\sqrt {d x -1}\, \sqrt {d x +1}}\) | \(95\) |
default | \(\frac {\left (-\arctan \left (\frac {1}{\sqrt {d^{2} x^{2}-1}}\right ) \operatorname {csgn}\left (d \right ) d b x +\sqrt {d^{2} x^{2}-1}\, \operatorname {csgn}\left (d \right ) d a +\ln \left (\left (\sqrt {d^{2} x^{2}-1}\, \operatorname {csgn}\left (d \right )+d x \right ) \operatorname {csgn}\left (d \right )\right ) c x \right ) \sqrt {d x -1}\, \sqrt {d x +1}\, \operatorname {csgn}\left (d \right )}{\sqrt {d^{2} x^{2}-1}\, x d}\) | \(96\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.49 \[ \int \frac {a+b x+c x^2}{x^2 \sqrt {-1+d x} \sqrt {1+d x}} \, dx=\frac {a d^{2} x + 2 \, b d x \arctan \left (-d x + \sqrt {d x + 1} \sqrt {d x - 1}\right ) + \sqrt {d x + 1} \sqrt {d x - 1} a d - c x \log \left (-d x + \sqrt {d x + 1} \sqrt {d x - 1}\right )}{d x} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 27.24 (sec) , antiderivative size = 216, normalized size of antiderivative = 3.93 \[ \int \frac {a+b x+c x^2}{x^2 \sqrt {-1+d x} \sqrt {1+d x}} \, dx=- \frac {a d {G_{6, 6}^{5, 3}\left (\begin {matrix} \frac {5}{4}, \frac {7}{4}, 1 & \frac {3}{2}, \frac {3}{2}, 2 \\1, \frac {5}{4}, \frac {3}{2}, \frac {7}{4}, 2 & 0 \end {matrix} \middle | {\frac {1}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}}} - \frac {i a d {G_{6, 6}^{2, 6}\left (\begin {matrix} \frac {1}{2}, \frac {3}{4}, 1, \frac {5}{4}, \frac {3}{2}, 1 & \\\frac {3}{4}, \frac {5}{4} & \frac {1}{2}, 1, 1, 0 \end {matrix} \middle | {\frac {e^{2 i \pi }}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}}} - \frac {b {G_{6, 6}^{5, 3}\left (\begin {matrix} \frac {3}{4}, \frac {5}{4}, 1 & 1, 1, \frac {3}{2} \\\frac {1}{2}, \frac {3}{4}, 1, \frac {5}{4}, \frac {3}{2} & 0 \end {matrix} \middle | {\frac {1}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}}} + \frac {i b {G_{6, 6}^{2, 6}\left (\begin {matrix} 0, \frac {1}{4}, \frac {1}{2}, \frac {3}{4}, 1, 1 & \\\frac {1}{4}, \frac {3}{4} & 0, \frac {1}{2}, \frac {1}{2}, 0 \end {matrix} \middle | {\frac {e^{2 i \pi }}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}}} + \frac {c {G_{6, 6}^{6, 2}\left (\begin {matrix} \frac {1}{4}, \frac {3}{4} & \frac {1}{2}, \frac {1}{2}, 1, 1 \\0, \frac {1}{4}, \frac {1}{2}, \frac {3}{4}, 1, 0 & \end {matrix} \middle | {\frac {1}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} d} - \frac {i c {G_{6, 6}^{2, 6}\left (\begin {matrix} - \frac {1}{2}, - \frac {1}{4}, 0, \frac {1}{4}, \frac {1}{2}, 1 & \\- \frac {1}{4}, \frac {1}{4} & - \frac {1}{2}, 0, 0, 0 \end {matrix} \middle | {\frac {e^{2 i \pi }}{d^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} d} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.02 \[ \int \frac {a+b x+c x^2}{x^2 \sqrt {-1+d x} \sqrt {1+d x}} \, dx=-b \arcsin \left (\frac {1}{d {\left | x \right |}}\right ) + \frac {c \log \left (2 \, d^{2} x + 2 \, \sqrt {d^{2} x^{2} - 1} d\right )}{d} + \frac {\sqrt {d^{2} x^{2} - 1} a}{x} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.51 \[ \int \frac {a+b x+c x^2}{x^2 \sqrt {-1+d x} \sqrt {1+d x}} \, dx=-\frac {2 \, b d \arctan \left (\frac {1}{2} \, {\left (\sqrt {d x + 1} - \sqrt {d x - 1}\right )}^{2}\right ) - \frac {8 \, a d^{2}}{{\left (\sqrt {d x + 1} - \sqrt {d x - 1}\right )}^{4} + 4} + c \log \left ({\left (\sqrt {d x + 1} - \sqrt {d x - 1}\right )}^{2}\right )}{d} \]
[In]
[Out]
Time = 4.12 (sec) , antiderivative size = 118, normalized size of antiderivative = 2.15 \[ \int \frac {a+b x+c x^2}{x^2 \sqrt {-1+d x} \sqrt {1+d x}} \, dx=\frac {a\,\sqrt {d\,x-1}\,\sqrt {d\,x+1}}{x}-\frac {4\,c\,\mathrm {atan}\left (\frac {d\,\left (\sqrt {d\,x-1}-\mathrm {i}\right )}{\left (\sqrt {d\,x+1}-1\right )\,\sqrt {-d^2}}\right )}{\sqrt {-d^2}}-b\,\left (\ln \left (\frac {{\left (\sqrt {d\,x-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {d\,x+1}-1\right )}^2}+1\right )-\ln \left (\frac {\sqrt {d\,x-1}-\mathrm {i}}{\sqrt {d\,x+1}-1}\right )\right )\,1{}\mathrm {i} \]
[In]
[Out]